<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>

<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInUp">
        <div class="row">
            <div class="col-sm-12">

                <div class="ibox">
                    <div class="ibox-title">
                        <h5>备案记录</h5>
                        <div class="ibox-tools">
                            <a class="btn btn-primary btn-xs" onclick="add()" shiro:hasPermission="module:activistEvolve:add">创建新积极分子备案</a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="row m-b-sm m-t-sm">
                            <div class="col-md-1">
                                <button type="button" id="loading-example-btn" class="btn btn-white btn-sm"><i class="fa fa-refresh"></i> 刷新</button>
                            </div>
                            <div class="col-md-11">
                                <div class="input-group">
                                    <input type="text" placeholder="请输入项目名称" class="input-sm form-control"> <span class="input-group-btn">
                                        <button type="button" class="btn btn-sm btn-primary"> 搜索</button> </span>
                                </div>
                            </div>
                        </div>

                        <div class="project-list">

                            <table class="table table-hover">
                                <tbody th:each="a, stat: ${activistEvolveList}">                      
                                    <tr>
                                        <td class="project-status">
                                            <span th:if="${a.state == 0}" class="badge badge-success">备案中</span>
                                            <span th:if="${a.state == 1}" class="badge badge-primary">备案完成</span>
                                        </td>
                                        <td class="project-title">
                                            <a th:text="'备案记录编号：' + ${a.activistEvolveId} + '(名称待完善)'" th:href="@{project_detail.html}">线下超市+线上商城+物流配送互联系统</a>
                                            <br/>
                                            <small th:text="'创建时间：' + ${#dates.format(a.submitTime,'yyyy-MM-dd')}"></small>
                                            
                                        </td>
                                        <!-- 
                                        <td> 
                                            <div style="margin-left: -150px;">
                                                <span style="color: red;"><strong>积极分子名册</strong>&nbsp;&nbsp;
                                                	<a th:href="@{/module/proposer/review(userId=${a.activistEvolveId},type=activistRoster,fileName=${a.activistRoster})}" class="btn btn-success btn-xs fa fa-edit" th:text="预览"></a>&nbsp;&nbsp;
	                        						<a th:href="@{/module/proposer/download(userId=${a.activistEvolveId},type=activistRoster,fileName=${a.activistRoster})}" class="btn btn-success btn-xs fa fa-edit" th:text="下载"></a>
                                                </span>
                                            </div>
                                        
                                        </td>
                                         -->
                                        
                                        <td class="project-people" th:if="${a.state == 1}">
                                            <div style="margin-left: -100px;">
                                                <span class="label label-primary">通过名单:</span>
                                                <span style="color: green" th:if="${a.successNameList != null}" th:text="${a.successNameList}"></span>
                                                <span style="color: red" th:if="${a.successNameList == null}" th:text="无通过名单"></span>
                                            </div>
                                        </td>
                                        <td class="project-people" th:if="${a.state == 1}">
                                            <div style="margin-left:">
                                                <span class="label label-danger">未通过名单:</span>
                                                <span style="color: orange" th:if="${a.failNameList != null}" th:text="${a.failNameList}"></span>
                                                <span style="color: red" th:if="${a.failNameList == null}" th:text="无未通过名单"></span>
                                            </div>
                                        </td>
                                        <td class="" th:if="${a.state == 0}">
                                        	<div style="margin-right: 200px;">
                            					<a class="btn btn-warning btn-rounded btn-block" href="buttons.html#"><i class="fa fa-info-circle"></i> 点击提醒上级进行备案</a>
                                        	</div>
                                        </td>
                                        
                                        
                                        <td class="project-actions">
                                        	
                                        </td>
                                    </tr>
                                    
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
	<div th:include="include :: footer"></div>
	<script>
		var prefix = ctx + "module/activistEvolve";
		var url = prefix + "/list";
		var createUrl = prefix + "/add";
		var updateUrl = prefix + "/edit/{id}";
		var removeUrl = prefix + "/remove";
		
		function add() {
				$.modal.open("添加备案", createUrl)
			}
	</script>
</body>
</html>